package com.mint.foobar;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringCloudApplication
//@SpringBootApplication
//@EnableDiscoveryClient //发现服务
//@EnableCircuitBreaker //断路器
public class FoobarApplication {

    @Bean
    @LoadBalanced//负载均衡
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(FoobarApplication.class, args);
    }
}
